package santiago.codebase;

import java.rmi.Remote;
import java.rmi.RemoteException;

public interface IClient extends Remote {

    /**
     * Returns the current player game name or null if the player is not in a
     * game. This method is also used to detect that the connexion has been lost
     * by server side
     *
     * @return current game name or <code>null</code> if not in game
     * @throws RemoteException
     */
    public String getGameName() throws RemoteException;

    /**
     * Allow the client to receive notification from the server. This method is
     * the center of the double communication appening in the application
     *
     * @param Notification The type of message that the server wants to
     * communicate
     * @throws RemoteException
     */
    public void notify(Notification Notification) throws RemoteException;

    /**
     * Allow the client to receive notification from the server. This method is
     * the center of the double communication appening in the application
     *
     * @param Notification The type of message that the server wants to
     * communicate
     * @param Data Attached notification data. Warning: the object needs to be
     * serializable
     * @throws RemoteException
     */
    public void notify(Notification Notification, Object Data) throws RemoteException;
}
